home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
impressario
/
bin
/
examples
/
libpod
/
README.z
/
README
Wrap
Text File
|
1996-05-06
|
4KB
|
107 lines
Example Programs
for
libpod
These example programs demonstrate the use of the libpod API. Each
program is designed to demonstrate a particular aspect of the API.
The programs also perform error handling using the library's error
handling facilities. Most programs are useful printer status tools in their
own right but a few are simply demonstrations not meant to perform any
particular task. Refer to the libpod(3) man pages for detailed
information on the libpod API.
Note that there are often two versions of the same program. One version,
prefixed with an 'l', uses the Local form of the libpod functions.
The other version of the program, without an 'l', uses the standard form
of the libpod functions. Refer to the libpod(3) man page for information
about the Local and Standard functions.
info - Usage: info printer_name
Demonstrates the use of the standard form of the libpod info
read function.
linfo - Usage: linfo printer_name [printer_opt_string]
Demonstrates the use of the local form of the libpod info
read and write functions. If printer_opt_string is specified,
it is expected to be a quoted string describing any optional
equipment the the specified printer may contain. An empty
string indicates no optional equipment. An attempt is made to
write the optional equipment information into the specified
printer's configuration file. If printer_opt_string is not
specified, the current configuration and status information
is displayed.
Note: You must have root or lp permissions to successfully run
this program to write the config file. There is no such
restriction on reading the config or status files.
logit - Usage: logit [-j job_id] [-u username] printer_name
start|end|{msg_code}
Demonstrates the use of the local libpod log file write function.
The message parameter specified on the command-line determines
the standard message that will be written to the log file.
start - prints a standard print job start message in the log file
end - prints a standard print job end message in the log file
msg_code - any valid message code number. Code numbers can be
specified in decimal, hex or octal.
Note: you must have root or lp permission to successfully run this
program.
lstatus - Usage: lstatus printer_name [op_status]
Demonstrates the use of the local form of the libpod status read
and write functions. If op_status is specified, an attempt is made
to write the new operational status to the printer POD status file.
The status before and after the write are displayed. If op_status
is not specified, the current status is displayed.
Note: You must have root or lp permissions to successfully run
this program to write the status file. There is no such
restriction on reading the status file.
message - Usage: message
Demonstrates how to use the PDMakeMessage function. The program
does not perform any useful work as far as interacting with POD
files.
pagesize - Usage: pagesize printer_name [page_size_name]
Demonstrates the use of the page size search function and
other page size convenience functions. The program obtains
the printer information structure using the standard info read
function. If a page size name has not been specified on the
command line the size information for the currently loaded
media is displayed. If a page size name has been specified,
the size information for that media is displayed if the
specified printer supports that page size.
readlog - Usage: readlog printer_name [num_lines]
Demonstrates the use of the standard form of the libpod log file
read function. If num_lines is not specified, the entire log file
will be read and display on standard out. If num_lines is specified,
the last num_lines lines of the log file will be read and displayed.
status - Usage: status printer_name
Demonstrates the use of the standard form of the libpod status
read functions.